package com.zd.service.lmpl;/**
 * @Description: SubstationServicelmpl
 * @Author:pioneer
 * @Date: 2021-07-08
 * @Version:v1.0
 */

import com.zd.mapper.SubstationMapper;
import com.zd.service.lnter.SubstationServicelnter;
import com.zzg.entity.Substation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Description: SubstationServicelmpl
 * @Author:pioneer
 * @Date: 2021-07-08
 * @Version:v1.0
 */
@Service
public class SubstationServicelmpl implements SubstationServicelnter {
    @Autowired
     public SubstationMapper substationMapper;
    /**
     * 查询所有分站信息
     *
     * @return 分站集合
     */
    @Override
    public List<Substation> selectSubstation() {
        return substationMapper.selectSubstation ();
    }

    /**
     * 根据分站id修改分站名称
     * @param stationName 分站名称
     * @param subid       分站id
     * @return 返回数值判断是否成功
     */
    @Override
    public int updateSubstation(String stationName, String subid) {
        return substationMapper.updateSubstation (stationName,subid);
    }
}
